﻿package src.event 
{
	import flash.events.Event;
	
	/**
	 * 菜單事件
	 * @author	MeatHill
	 * @version	0.1(2009-08-02)
	 */
	public class menuEvent extends Event 
	{
		public static const SHOW_DETAIL:String = "show_detail";
		public static const SHOW_MENU:String = "show_menu";
		public static const HIDE_MENU:String = "hide_menu";
		
		private var _command_type:String = "";
		private var _param_obj:Object = "";
		private var _name_str:String = "";
		
		public function menuEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) 
		{ 
			super(type, bubbles, cancelable);
			
		}
		
		/**************
		 * properties
		 * ***********/
		public function set command(str:String):void {
			_command_type = str;
		}
		public function get command():String {
			return _command_type;
		}
		public function set param(obj:Object):void {
			_param_obj = obj;
		}
		public function get param():Object {
			return _param_obj;
		}
		public function set name(str:String):void {
			_name_str = str;
		}
		public function get name():String {
			return _name_str;
		}
		
		/**************
		 * methods
		 * ***********/
		public override function clone():Event { 
			var _evt:menuEvent = new menuEvent(type, bubbles, cancelable);
			_evt.command = _command_type;
			_evt.param = _param_obj;
			_evt.name = _name_str;
			return _evt;
		}
		public override function toString():String { 
			return formatToString("menuEvent", "type", "bubbles", "cancelable", "eventPhase"); 
		}
	}
}